import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@interface Component{}

@Component
public class reflect {
    public static void main(String[] args) throws Exception{
        Class<?> cls = Class.forName("java.util.List");
        boolean flag = cls.isAnnotationPresent(Component.class);
        if(flag){
            Object ob1 = cls.newInstance();
        }
    }
}
